import instance from "@/utils/request";

// 登录页需要用到的图形验证码接口
export function getcaptcha() {
    return instance({
        url: '/captcha/api/math',
        method: 'get',
    })
}

// 登录
export function loginApi(data) {
    return instance({
        url: '/api/common/auth/login',
        method: 'post',
        data,
    })
}

// 获取用户列表
export function getUsersData(data){
    return instance({
        url:'/api/users',
        method:'get',
        params:data
    })
}

// 添加用户
export function getAddUsers(data){
    return instance({
        url:'/api/users/add',
        method:'post',
        data
    })
}